package com.test.app;

import com.me.dao.DictItemMapper;
import com.me.entity.DictItem;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * Created by zhangzhen on 2016/7/24.
 */
public class Main {
    public  transient  static Log log = LogFactory.getLog(Main.class);
    @Test
    public void testResource() throws Exception {
        ApplicationContext ctx=null;
        ctx=new ClassPathXmlApplicationContext("applicationContext.xml");
        DictItemMapper dictItemMapper =(DictItemMapper)ctx.getBean("dictItemDao");
        DictItem dict = dictItemMapper.selectByPrimaryKey(2);
        log.info(dict);
    }
}
